package com.dxy.gateway.provider;

import com.dxy.common.utils.JwtUtil;
import com.dxy.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "auth-service", path = "/auth")
public interface AuthServiceProvider {

    @PostMapping("/checkPermission")
    Result<Boolean> checkPermission(@RequestHeader(JwtUtil.TOKEN_NAME) String token, @RequestParam("url") String url);
}
